# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=soapyuhd
_pkgname=SoapyUHD
pkgver=0.4.1
_gitver=soapy-uhd-$pkgver
pkgrel=9
pkgdesc='Soapy SDR plugin for UHD supported SDR devices'
arch=('loong64' 'x86_64')
url='https://github.com/pothosware/SoapyUHD'
license=('GPL3')
depends=('libuhd' 'soapysdr')
makedepends=('cmake' 'boost')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
sha512sums=('7a78ac386d92e4b36b36710f5943623ec8742cb770df69ac0c9bbd26827567277cb3309e3ad6eb0148b1b76083f16fdd188619700d38dcc5eab362b6db65340f')

build() {
  mkdir -p $_pkgname-$_gitver/build
  cd $_pkgname-$_gitver/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release

  make
}

package() {
  cd $_pkgname-$_gitver/build

  make DESTDIR="$pkgdir" install
}
